Fixed freeing arrays