changed error to panic, fixed addressing in flavor ref