Fix issues raised in PR