navbar js fix for refresh