fix dying on right side of obstacle