Misc Bug Fixes

**Ready to Merge**

Assorted bug fixes.