fix duplicate logic
Starting to debug flow problems