fixing on set detection
fixing onSet