Fixed exception in output thread. Resolves #3.