fixed some for cycles