I added a check in main.