Fixed populate_history