Fixed potential uninitialized buffer errors