Added extra variables needed to fix issue with 500 errors.