added fix for type cast issue
Merge pull request #317 from sheebans/master

added fix for type cast issue