fix error in sql syntax