Fix wrong SQL syntax