Added changes suggested by flerda