Fix create bucket error handling bug