Some bugfixes
Merge pull request #3 from Satyam/small-bugfixes

Some bugfixes