fixed issue with 'on' method