Fix function check