Fix for SQL query typo