fixed the problem with selecting means