Fixed bug in REST service.