fix errors when body is not defined