Fixed dbname undefined