[Fixed] state not clearing after route change

update formatting