Added some code in historyBUfferReadPrevious and historyBufferReadNext function