bugfix: nullpointer in collision detection