Corrected function.