Fixes #462 again.
rebased onto f294254be3afaad222c5c3df14e69a5c9578a4ec
Since this should have been part of the previous PR which is merged already, I'll merge that one.
Pull-Request has been merged by abompard
Fixes #462 again.