fixed the bug with history items