partial fix upstream