Fix #506 for 2.4.2