Rebase and merge changes of PR#131