Added missing if !defined conditional