Fix for https://github.com/magicalpanda/MagicalRecord/issues/387