rule undefined fix