Add profile handling to set rule