wrong location used in the stack when reporting errors