fix Illegal Function Call on resuming in different text mode