Fix function_exists check