Merge pull request #386 from anoopsjohn/master

Issue#376 & #313
Issue#401