fixed error handling when location null