Removes duplicate code
Merge pull request #194 from erwinvanhunen/RealmFix

Removes duplicate code