dev: fix null pointer exception bug