I'd try to drive the pins to a known state at the beginning of setup().
They are still floating for 1-2 seconds as the chip starts up and (by far the longest) the bootloader screws around.
Pull down resistors are the only answer I think.
EDIT: I see you last post, don't know how that's worked but if it has well and good.
Rob