Fix a bug in signing payment transaction