rebase from upstream master (cpbotha)