I borrowed my friend's wah the other day and if I try to use both his wah and my distortion pedal I get a high-pitched whining sound.

Setup looks like this:

Guitar > Wah > Distortion > Fender Frontman (amp)

I've also tried putting the distortion in front of the wah.

Is it possible to use both pedals with my current setup or do I need some other piece of equipment?

Any help is appreciated, and if there's any more information you need just let me know.