Fixed issue with print_bcd function