a bug was there which was not updating the quantity to 1. Fixed it