added workaround to prevent going into walls