Signature verification and bugfixes