fixed returning issue in _auto_publish