fix clear fn