Ceiling fan switch replacement

I am replacing a Hunter fan switch. (Don't have the model number) I have the new switch attached to: Black(hot) Purple -low, brown - medium and gray - fast but It is not working. After disconnecting the original switch, a green wire must have fallen out of somewhere and after some research I am told it must be a ground wire but there is no terminal on the fan housing. If I touch this green wire to the black the fan will spin at just one speed. Any help would be greatly appreciated. Thank you. Rhett Davis