Fixes return values of some factory calls