fixed an insufficient item for looping
fixed looping error