Added check for array already shutdown