fix: all compilation errors and most warnings given by 4.00.1