Improving fix as per comment on pull request