Fixed bug with undefined data item