Corrected function selection error