build fixes optimized