fixed a bug with value attribute