segfault in getFaces api function fixed