bugfix to be able to pass undefined as encoding