Bug fixing on shopping cart factory