Fixed setting wrong 'open' class on initial switch