rest bug fixes