Compilation fix + other fixes