Corrected an error message and removed sample code