fixed issue with clear only happening on double click