fix web encoding, fix validation of signatures when no signature present