fix race condition in transformation service