Fixed problem with state in text module