Fix #2521 by @scento