Potenzielle Race-Condition behoben