Fix missing year variable issue