Cycle fix

Fix of cycle error, where all returned values were same.