fix bug on old version