fixed null pointer in history