history bug fixes