#49 Fixed page unload behavior