fixed some bugs with image uploading and cart