options undefined fix