beginContact and endContact events fixes