Fix rest response codes