Subscripting and dealloc fixes