Added fixes from PR comments