Fixed a bug in the toolbar plugin