Added some required variables and fixed a typo