fix bug in spj_example.c