untested fix for Undefined index: site