Fix for issue #7

The changes currently lose output coloring support and they might not replicate previous behaviour 100%