Updated work with MagicalRecord.