Fix working on list when its not a list

Change-Id: Iec98b0c59131546d25bce2149ad050e02a0bc358