Fix Undefined offset Notice (thx @vjousse)