target: fix null pointer exception