fixed uninitialized memory issue