notice undefined fix