Fixes factory function usage