fixed run-into-wall issue