fixed handling of database command line arguments and optional port in database configuration