Added better warning generation.