Corrected formatting. Simplified if check.