Corrected navbar behavior on window resize and on scroll on short windows.
Related to #257.