Use strncpy instead of stpncpy
Support new item types