Depending on the exact position where the roof stops, will determine what procedure you have to follow.
Firstly lubricate the 5th bow lock assembly with Genuine Nissan Window Regulator Grease.
If this does not fix your issue, twist the auto-closure wire back into the closure motor.
Lastly if still not working, remove and refurb the 5th bow motor.