Fixing issue with factory cache