Backwards compatible fix for issue #30 by @PhilippSchreiber.