changes from upstream
bugfix