Chnaged the way we handle the delegate. Corrected a bug about the order of the delegate methods call