fixed check_hex