Api queries fixed