Some loop fixin'