fix wrong history order