fix null body handling