solved issues from Petra
Merge pull request #13 from ebf/xiaodong

solved issues from Petra