validate signature, fixes #11