fixed if and spinner selection