Fixes history order