Fixed Undefined Offset on main page