RN-XV join delay

Greetings,

I just started playing with RN-XV shield and connected this successfully to an Arduino Mega. Everything works fine, but time by time after resets on Arduino or power down conditions the execution of the program halts. I have traced the problem to the WiFly.begin() inside the void setup loop. It is a WiFly.join problem. The shield for whatever reason does not associate fast enough or at all with my wifi network.

How would you guys fix something like this ?

For me Mega is driving a reef tank controller and I can not afford to have the program halted after random power grid failures.

cheers,

MaLi