fix bug on dynamic checking