fix returnIdsOnly and merge POST params