Update js to display correclty after updating db