Fixed bug where error location information was calculating NaNs