Fix function check.
Merge branch '4.0'