Fixed problems in RESTFul API