Implemented autofocus correctly.