Bug fixes for test involving Factory Muffin