Fixing factory issues