fix clear method.