Fix encode error + license header