Correcting error in cross function