fix binary output issue