Fixed underlying cause of offset by 1 condition.