fix issue #896
fix issue #647
Merge pull request #950 from clevertension/bugbounty-2

fix issue #896,#647