Compilation and tests fixes;