fixed some compilation errors.