Bug fixes and graceful failing