Moved update-viewport event
Reinstating a small check.