improved dump-to-db behaviour