ui.new() no longer sets canvas state
Fix race condition