Fix use of $flags in Compute()