Possible fix for Illegal seek bug