Fix for resetting navPos variablt on resize.