Added check on remove toolbar to prevent error.