Readd inadvertently removed if statement