fixed transformation bug for factories