fixed serialize problems