to handle ValueError
Merge pull request #18 from vnitinv/fix-ValueError

to handle ValueError