Added extra conditional statements for compilation