Merge  #718 and close #705