Corrected on() bug