strange issue with doctrine