Fixing overflows when handling tracks without any elements