Fixed "undefined index: size" issue