Initialized potentially uninitialized variable in markdown part
Avoid a (theoretical) memory leak
Added guard to prevent (theoretical) out of bound access