Bugfix: Use '' instead of \' to escape single quotes in SQL