Cleanup will now properly empty arrays