Is this erroring in the wrong place?