re-add bugfix from master