Bug fix: Repeat Map hitting the end of file