From your description is the below scenario what is happening?
When closing the sunroof does it close until the point where the rear of the lid won't lift up to close flush with the roof at the rear?
This is the most common issue. If this is the case its not the gear which is at fault it is the...