Correcting error message and remove obsolete line