fixed some compilation errors