Several small fixes for MAC && Triton