fix nul to string conversion issue