fixed input val bug