File seek bug fix