fix null pointer due to logger in release