Fix some multi-input signing bugs, still not working properly