Made Tk thread safe for cava build