history fix

fixed histroy display exception and pagination bug