fix for wrong error location