[Issue #87] Fixing conditional for entity body encoding