Fixing some syntax errors after variable-database migration