Fix fetching cseq number for replies.

Closes #165.