resolve #506