Why am I getting an error message when deleting a location?