Fix history test

Until now it worked only if there were no caches in history