Fixed use of .on()

Signed-off-by: Julien Blatecky <julien1619@gmail.com>