entity manager fix.