fix progurad optimizations