fix loop stuff some more. now seems fast again.