fixed a bad cycle calculation algorithm. was going to cause issues next
cycle 1501