Fixed dispatch keyword in history function