TEST ugly change to make the history tests pass again

This must be refactored, it is very difficult to follow