Manually merging in stenix71's change