[Fixed] compilation errors and tests