fix shadowed err bug