improve parsing of signatures