Fix #506