Changed onKick function