Add debug to find seg fault