fix chunk size bug