Fix empty history bug

This fixes a not yet reported bug. Steps:
1. Open history
2. Make changes to the file (maybe whitespace) and save (the changes table is shown)
3. Try to open history again