Better handling of switch events
Merge pull request #247 from jorgesilva/develop

Better handling of switch events