Clear reset flag. My mistake :(. Now phone restarts well when is in charging and turned off. :)