use correct status code if available