fix bucket selection

fix pointer handling in the containers.