from upstream: https://github.com/jy0205/Pyramid-Flow/commit/bf10e7340cd1e3467c7b88053bc0f413eb1a6073#diff-8e1c08bf8ab5d587ee253dccfb631b170202adf0664272785a9b377975ffb8a5R145
from upstream: https://github.com/jy0205/Pyramid-Flow/commit/bf10e7340cd1e3467c7b88053bc0f413eb1a6073#diff-8e1c08bf8ab5d587ee253dccfb631b170202adf0664272785a9b377975ffb8a5R145