rest controller fixes