Need to call the exit method in order for it to work