Trying to fix chunk index error