Don't crash when running several bars in threads