correct warning and error