fixed drawing code for obstacles