bugfix in dump code