Correct undeclared $val