Fixed clear button not working as intended