Resolved overflowed integer and 'beforeload' event issues