Updated so it will compile with the latest threadly