Fix for rectangle capture staying top of dialogs