fix initialization null pointer exception