Schaf and sameInstances bugfixes