add some changes from raring patch set