fixed #196, and more