Fix slight variable race