Edited exit to be dependent on profile