fix bugs introduced by interface change.