Fixed bugs in dumper.py