Fix onunload event for js
Merge pull request #10 from ajhager/dev

Fix onunload event for js