minor memory improvements for bucket