close #207 and some other minor fixes