fix compilation errors and tests