fixed bug in clear button, works across all browsers