fix usage of jquery.on