Attempt to fix database error
Add command-line flags