bug-fix: missing semi-colons in sql query