Fix traceback when deleting current profile and restarting