bugfix from last PR