fix item undefined bug