Follow up pullrequest #49 (fix regression + test).