Fix deadlock unloading chunks

Signed-off-by: Ross Allan <rallanpcl@gmail.com>