Fixed outofbounds error on click
fixed obstacle timing