Bug fix for #460
Merge pull request #481 from lingalamadhukar/bugfixes

Bug fix for #460