patch as proposed in #7