Fix issue with creating an adapter