fix some r# errors