Added server auto-reference variable to addApplication method.