fix nested lists