Fixed bugs on manipulating small files