Removing redundant flag reset signals.