Made some fixes as suggested in the PR