changed file descriptor that we're writing to from 0 to 1

I have no idea why it was working before :-/