probable fix for seg fault