Fixed bugs in inquiries system