fix to globalstate - to fix bug when loading from memory after
application has paged out.