Improvements to Flyout handling