Fix some compilation issues