fix opt and profile builds