protect against undefined vars