fix a small bug in item.js
add auto check when change census register type