Small fixes discovered by testing on binary