Moving $entityManager outside the if clause
Merge pull request #29 from ngodfraind/master

Moving $entityManager outside the if clause