Fix possible race condition in printcore.startprint