fix bug about validation