fix: prevent errors if select is hidden