Conditional statement for openalls