fix empty bucket error