Bug fixes for SDA.