fix #744
fix #716
fix #769
Merge pull request #773 from sckasturi/patch-4

fix #769