fixed toolbar logic