Set state change conditions