fixes as per PR comments