I merged some changes from Travis's fork