fix #83, fix #82, fixn #75, fix #64, fix #88
Merge pull request #87 from rakeshok/somebugs

fix 83, 82, 75, 64, 88