Fix #270

All details are described in #270