Bug Fixes

Further bug fixes.