Fixed bug in bucket creation