Made some bug fixes.
Merge pull request #33 from arshsab/master

Made some bug fixes.