Return the correct status code