Stability enhancements and several bug fixes