improve filter and fix attribute rendering