Fixed incomplete code