Fixes #145

This might not be acceptable per #145 but it solved the SQL syntax error for me on mysql 5.6.19