fix: fix null pointer access