Fixes typo in some queries