Various changes to improve reliability.