More fixes based on PR comments