Fix bug about REST API