fix the logic for showing hint