some fixes wrt pull request1