misc fixes

close #10 #23