Fixed clear button function