fix bug with PolyDense#apply