Fixed some bugs; exact position specification in error messages