Fixing bug resulting from api change.