fix generator bug with absent chars