fixing mysql syntax error