Rebase from master 0.9.1