remove superfluous clause in encoder