Fixed typo
Merged if statements for cyclic checks