fixed bug with the adapter