Fixing a bug on the toolbar resizing.