Minor Bugfixes

Fixing minor bugs that came up.