Fixed code contracts error