fix for exists branch