Changes by a-kulbei

Since he did not change after your comments, here is a pull request with his changes since I had the same issues.