Fixing many bugs in NSArray