fix logic for sendmany