Small conditional fix in list()