Fixed end bytes bug.