Fix a bug that prevent AF to work