fix panic in encoding unexported fields