fix clear()'s bug