fix null-bug