Fixes for rm and unpack cache