fixed bug that occured with factories that returned null