Fixed bug in EntityFilter determining the final step