fix stupid loop