Major bug fix, now dumping works too.