some tweaks to make dafny happy