fixed undefined data error when creating the display