Fixed strange arithmetic error. Fixed by removing leading zero before arithmetic operation.

Gave arithmetic errors:
$(( 08 % 3 ))
$(( 09 % 3 ))

Worked just fine:
$(( 07 % 3 ))
$(( 10 % 3 ))