Don't use threads and re-order things to avoid variable unassignments