fix some compilation errors