fix bug with hibernation