Trying to fix strange navbar behaviour