Fix some sde issues.