Welcome to The RV Forum Candyk!
What kind of fan did you install? Sometimes you have to bring an unswitched source of 12 volts to the fan for the raise/lower motor to work properly.
When you turn the wall switch on, 12 volts is available to raise the cover. But when you turn the switch off, there's no power to retract the cover.