Maybe the problem is that you are using "used" for "mem" here and the other way around above.