fix bug validate