fix issue with bucket name calculation