Fixed up REST code.