Fixed some configuration/array memory management