fixed prefered_state variable
Merge remote-tracking branch 'franklinkim/master'