fixed bugs in select_a_variant and change color, cancelling color changing operation in select_a_variant