merged changes with latest upstream modifications