Fix factory transformer bug