Doctrine Integration; Bugfix