fixed a bug in filter writing