Lost configuration and firmware automatic downgrade

Regarding the X2e ZigBee Wifi gateway…
While running firmware 3.2.7.10, the gateway lost and regained power some times in a short period. After it stabilized, the gateway had gone back to firmware 3.2.2.22 (previous firmware installed) and also lost the current configurations (at least the wifi ones) and went back to previous configurations.
Is it a bug in the firmware?

No it is not. Until the firmware upgrade is complete and the reboot occurs, the firmware is not installed and all settings and versions are retained.

I didn’t make myself clear. That didn’t happen while updating the firmware. When I say “While running firmware 3.2.7.10”, I mean that version 3.2.7.10 was running without issues for a couple of weeks. And then, the gateway lost and regained power some times in a short period (so, some times the initialization process of the gateway was not concluded). After the power stabilized and the gateway finally (fully) booted up, the gateway had gone back to firmware 3.2.2.22 (previous firmware installed) and also lost the current configurations (at least the wifi ones) and went back to previous configurations.

Do you have a Device Cloud account? is it possible that this gateway is associated with that account?

I have a Device Cloud account but it doesn’t matter if it is added to the Cloud or not.
I’ve got 5 gateways added to the Cloud and managed to replicate this bug (or feature, that’s my doubt!) on those 5 and on the others that are not connected to the Cloud account.
This issue can/has occurred in any of the 40+ gateways we have, if the right sequence of events happen.