fixed dao selection code