Make sure viewportChange is fired properly

Closes #2955