Added compatibility with upstream code