fixed case of empty history/empty firstpage