Bugfixes for sortKey and signature

Fix a small copy paste bug