fix copy from shared state issue