Optimized the chunk loading/unloading process