improved handling of signatures