Set the power switch of the camera to OFF before attaching the lens.
Set the power switch of the camera to OFF before you remove the lens.