Fix an undef variable error