Made AfterHibernation function run only if BeforeHibernation function ran