Fix wrong type of event binding.

Fixes: Has no method .on()