fixed empty bucket bug