Added wait at each lightSwitch call