Fix dealocate array of pointers