fix loading error, fix scope of this error