Added potential fix for toolbox staying open sometimes (due to popup
hidden not firing?).