Fixed the parameter type on all the onEvent functions