This line is buggy.. it checks for "if [Pancake] is [1]", therefore default values come out wrong.. It should be something along the line:
if($option["std"][$key] == $selected_val) {