fixed minor syntax errors in the sql script