Fixed layout issue with show and hide history