Fixing adapter.getItem() issue