Fixed bug that was causing a hang on some files.