Fixed major mistakes in collsision detection