Remove debug reistring in factory