Fix #521

See 80f2323