Solves 302 in upstream.
Merge pull request #548 from DannyvdSluijs/master

Solves #302 in upstream.