Fix Doctrine service calls. Fixes #677