bugfixes in specification writer