check ack mode correctly on createSession
Merge pull request #1219 from andytaylor/master

check ack mode correctly on createSession