Add part of @NGillain #48