bugfix in handling binary content