Fix errors in BaseAdapter