fix loadstate