Fixes an Exception being thrown that causes the app to crash when trying to attach a location