Snicolas/issue 213

Can be merged ASAP.