Fix bug with doctrine and bjyauthorize