Bug Fixes

Fixed minor bugs.