fixed crash while generating field