modification for #506