Changed cogs functionality to fix the bug.