Fix last build error by adding explicit cast for function pointer