updated: merged latest upstream changes.