Fixed bug where two realm transactions were opened at one time