Adds exit on detect