Minor fix
Improve flexibility of structwriter