fix missing ; and undeclared var, fixes #16520