Fixed two bugs in select_good - undefined var and no select