Fix build warnings (optimized)