fix problem in new rest demo