Fixed unitialized memory issue