Reference Error Fix

Err had been replaced by variable data in function call.  An err
variable inside was not replaced.