Bugs and issues found with toBinary.java