Fix wrong data format being dumped

c8af625aa4 introduced a regression, no failing tests were found.
Tests weren't catching the problem, so I also fixed the tests.
Merge pull request #1 from VnC-/master

Regression fix