fix some visual glitches on multiple show/hide operations