Reverted changeds in bintodec function