Added second check for existence of subsite variable.