fix for wrong response while accessing REST api