Improved error location