fixed a segmentation fault
missing function call