fixed issue where switch becomes unresponsive