replace std::queue with std::vector, because queue crashes (probably because the memory is overwritten by a memset after the constructor)