update if statement for deployment cleanup