Added debugging assertions