Corrected wrong variable name and added missing brackets.