Fixes undeclared var, adds fake returns