Fix undefined item problem