Fix crash when "clearall" is used.