fix clear() issue