fixed simple bug onunload events introduced in 3.4.4 version.