fix build and reverted some flags