corrected undefined object