undefined result fix