fixed output issue (but broken some tests. 'll fix them later :-/)