better navbar handling