fixes according to comments for last pull request