fix bugs on bucket_set and bucket_unset