fixed bug in collision