place spaces to the output properly

revert 3658e99be5a1010a9d2e34d7d7f1dc214f5f82fd