Mine is set not to operate if the speed is greater than zero mph, come up and says speed to fast. Done the same at lights myself and found a similar situation.
Worse than that I got caught on the motorway in a cloud burst, had to pull over and that 30sec time for the roof to close seemed like an eternity. Every thing was completely soaked. A lesson to me that you should only use the sun roof if there is a strong possibility of rain and you are motorway driving.Been caught in rain and the roof won't go up when moving, done the same thing as you at lights but had to drive with it half up/half down for about 2 mins looking like a right doughnut before I could pull over!!