Made logic chooser work