updated encoding checking while making BS object