Fixed collision checking problem