Fixed hasOffer function!