Fixed bug in dom's val() method.