fix createsession for correct tx mode and ackmode
Merge pull request #1224 from andytaylor/master

fix createsession for correct tx mode and ackmode