fixed an error in returning a restaurant object