fix issue with clear()