Tried to make applicationstate serializable