fix python bool flags

close #517