Fixed a bug (hang up after resume from hibernation)