Bug fixes

Fixing minor issues