added fixed based on PR comments