fixed hooks when exit on reload is in place