Prevent errors when the toolbar is disabled