remove bug in cross by considering selection also