merge with master upstream
fix double cas