text var could be undefined