Fix for cycle on empty seq