Fix onbeforechange event bug, related to #157 and #152