fix algorithm chooser bug