fix compiler errors for certain compiler settings