Minor fix on adapter.py