Instanceof now persists correctly. Fixes #53