fixed some mem management bugs, fixed text assignment and text literal setting