This fixes a problem with the listadd function.