Bug Fixes

More bug fixes.