Fixed some compilation errors from next.