fixed bug for clear