fix bugs in model history upload