fixed bug (RESTful API)