Fixes for HLSL