Fix db dump inconsistency and test fixture