Optimized "hide on startup" logic.