fix rest requests