Problems I've had with your sunroof issue is the rear part of the gasket can 'stick' to the moonroof when trying drop down to slide back. Don't over do it, I think that's how I broke my rails up there($1200). I put a little lube on it (silicon based if I remember) and it worked. I've also had the whole roof jam intermitently due to an acorn in the tracks rolling around.
1994 E320 Wagon (Died @ 308,669 miles)
1995 E300 Diesel (194,000)
1999 E300 Turbodiesel (244,000 miles, dies at 255,000)
2006 Toyota Tundra SR5 AC 4X4 (115,000 miles)
2011 Audi A4 Avant (129,000 miles) hate this car!
BMW 330 xi 6 speed manual (100,034 miles)