Some changes to improve stability.