added length check on potential WIF input