fixed error if navigation doesn't exist