fix the convert to null issue