fix doctrine setup and api