What is the state of all the unused and floating pins ? Are they outputs or inputs ?
If you have them set (tris setting) as input then turn them into output and clear them to zero.

Never leave inputs floating without pullup or pulldown.

Cheers

Al.