Bugfixes to RestController.