fixed binary conversion of ip