Made the api compatible with infrastructure changes