Key code correction, null item value check, trim space on new tags.