Fixes wrong .length value for arrays.