Sentence: The sun was covered by a thick cloud all morning, but luckily, by the time the picnic started, it was out.
 Reason: The 'it' refers to the sun because a thick cloud all morning, but luckily the sun was covered. 
 Question: Is the above reasoning correct or wrong? 