last updates to work with doctrine correctly