Bug fixes, changes, and more failsafes