fixing autofocus bug