Fix where flag is setted