fix runtime error

make sure struct is created