fixed the invalidBody flag