modified by patch code, but it seems something wrong