fix filter render for output layer and generalize better