correct hint_fn detection code