fix error in square obstacle