Fix stupid issue with flags checking