Fix history.state errors
Fix #157 Upload progress indicator shows wrong percentages