Modified the filtering to not break images