Debugging undefined text problem