fix db management script bug

introduced in b99683e