fixed crash with uninitialized pointer