firstObject not available in ios6