fix double class declarations

fix #142