Fixed a bug in navigating to and from buildings