Fixed parameter assignment (default encoding).
Fixed several warnings.