Fixed reset-emergency bug