Fix message formatting (fixes issue #195).
Merge remote-tracking branch 'kingtim/master' into ns-fix3