fix undefineds