Fix issues raised by reviewers