Fixed bug in CustomAdapter