Fix #1185 and REST api handler(s)