Fixes rule generation if Fri extends until Sat (patch provided by Makkie2002)