Fix crash when comparing files