Fixing quotes for SQL command