Fixing comparison of var(int) with var(dynamic)