Fixed a bug with pathing problem