Delete 'undefined' + improve size calculation