FUL-165 - fix entity manager issue + minor bug