Removing the currentRealm from the finally block.