Monkey patch to try and make print flush properly.