Fix windows crash and textdisplay assignment of nil values