Applied patch provided by Franz Detro. Permission by maintainer Thorsten Ottosen.