fix bug in Mock DB queries