added collision prevention for left/right collisions