bug: illegal state(), memory-full