Fix state loading.