fixing bucket variable