updated to properly cache nativePromiseEnd