Improved error fixing.