Minor bugfix, fixes #24

PR for patch recommended by @ssagaert