fixed where clause to check for rerun